<?php $this->load->view('sys_header');?>

<script type="text/javascript">


    function ajax_submit(){


        $.messager.progress();
        editor.sync(); //同步编辑器数据
        $.ajax({
            type:"post",
            dataType:'json',
            url:'<?php echo made_admin_url('info/edit?action=more');?>',
            data:$('#cpform').serialize(),
            success:function(r){
                if(r && r.success)
                {
                    $.messager.progress('close');
                    $.messager.confirm('成功提示','修改成功，返回信息列表。',function(b){
                        if(b)
                        {
                            window.location.href='<?php echo made_admin_url('info');?>';
                            return false; //hack ie6跳转无效
                        }

                    });
                }
                else
                {
                    lin.msg('发生错误，数据提交失败！','error');
                }
            }
        });

    }







</script>

<div class="nav">
    <h2><a href="<?php echo made_admin_url('main/mainfra');?>">TAYCMS后台管理</a> >  <a href="<?php echo made_admin_url('info');?>">单页信息管理</a> > <a href="<?php echo made_admin_url('info/editmore?id='.$items['id']);?>">编辑内容</a> </h2>
</div>



<div class="contenter">
    <div class="editpage">
    <h1></h1>
    <div class="ml"></div>

    <div id="editform">

        <form name="cpform" method="post" autocomplete="off"    id="cpform"   >

            <table  width="100%" border="0" align="left" cellpadding="0" cellspacing="0" >
                <TR>
                    <TD width="100%">

                        <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0"  >
                            <tr>
                                <td width="12%" height="30">标题：</td>
                                <td width="88%"><label>
                                    <input type="text" name="title" id="title" class="border" value="<?php echo $items['title'] ;?>" size="50" />
                                </label></td>
                            </tr>

                            <tr>
                                <td>分类：</td>
                                <td><select name="classid" class="select" style="width: 127px;"  >
                                    <option value="0">请选择信息分类</option>
                                    <?php foreach($info_class as $i): ?>
                                    <option value="<?php echo $i['classid']?>" <?php if($i['classid'] == $items['classid']):?>selected="selected" <?php endif; ?>><?php echo $i['classname']?></option>
                                    <?php endforeach; ?>
                                </select></td>
                            </tr>

                            <tr>
                                <td>信息内容：</td>
                                <td>
                                <?php echo load_editor($items['content']); ?>
                                </td>
                            </tr>

                            <tr>
                                <td height="30">点击量：</td>
                                <td><label>
                                    <input type="text" name="hits" id="hits" size="10" class="border" value="<?php echo $items['hits']?>" />
                                      </label></td>
                            </tr>


                            <tr>
                                <td height="30">信息链接：</td>
                                <td><label>
                                    <input type="text" name="url" id="url" size="30" class="border" value="<?php echo $items['url']?>" />
                                    填写后信息直接跳转到链接，不外链请勿填写。 </label></td>
                            </tr>


                            <tr>
                                <td height="30">添加时间：</td>
                                <td><label>
                                    <input type="text" name="addtime" id="addtime" size="30" readonly="readonly"  class="easyui-datetimebox border" style="width: 140px;" value="<?php echo date('Y-d-m H:i:s',$items['addtime']);?>" />
                                    请使用正确格式如：2012-03-25 11:47:48</label></td>
                            </tr>




                        </table>


                    </TD>
                </TR>
                <tr>
                    <td height="30" colspan="2" align="center">
                        <br><br>
                    <label>
                        <input name="id" type="hidden"  value="<?php echo $items['id']; ?>"    />
                        <input name="submit" type="button" id="submit" value="提交" onclick="ajax_submit()"   class="sub_btn" />
                    </label>
                        <label>
                            <input name="re" type="button" id="re" value="返回" onclick="window.location.href='<?php echo made_admin_url('info');?>'"   class="sub_btn" />
                        </label>
                    </td>
                </tr>
            </table>


        </form>


    </div>

</div>
</div>







<?php $this->load->view('sys_footer');?>